﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using championchipKarate;


namespace championchipKarate
{
    public partial class FormCadastroFiliacao : Form
    {
        
        public FormCadastroFiliacao()
        {
            InitializeComponent();
        }

        private void buttonCadastrar_Click(object sender, EventArgs e)
        {
            if (textBoxNome.Text != "" && FormPrincipal.caminhoArquivo != "")
            {
                StreamWriter wd = new StreamWriter(@FormPrincipal.caminhoArquivo, true);
                wd.WriteLine("<FILIACAO>" + ";" + textBoxNome.Text + ";" + comboBox1.Text);
                wd.Close();
                FormCadastroFiliacao.ActiveForm.Close();
                wd.Dispose();
                
            }
        }

        private void buttonCancelar_Click(object sender, EventArgs e)
        {
            FormCadastroFiliacao.ActiveForm.Close();
        }
    }
}
